exports.keys = 'your_secret_key_here_123456';

exports.jwt = {
  secret: 'your_secret_key_here_123456',
  expiresIn: '1d'
};

exports.security = {
  csrf: {
    enable: false
  }
};

exports.middleware = [ 'camelCase' ];

// 导入数据库配置文件
const dbConfig = require('../database/config.json');

// 根据环境选择数据库配置
const env = process.env.NODE_ENV || 'development';
const currentDbConfig = dbConfig[env];

exports.sequelize = {
  dialect: 'mysql',
  host: currentDbConfig.host,
  port: 3306,
  database: currentDbConfig.database,
  username: currentDbConfig.username,
  password: currentDbConfig.password,
  timezone: '+08:00', // 设置时区
  define: {
    freezeTableName: false, // 表名自动复数
    timestamps: true, // 自动添加createdAt和updatedAt字段
    createdAt: 'created_at', // 自定义创建时间字段名
    updatedAt: 'updated_at', // 自定义更新时间字段名
  },
};

